package com.whatever;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteCursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.TextView;

public class SqlPracticeActivity extends Activity {
    
	private DatabaseHelper helper;
	private Cursor dataCursor;
	private TextView textView;
	private LinearLayout layout;
	private SQLiteDatabase database;
	private Bundle savedInstanceState;
	private Context cxt = this;
	private final String DATABASE_NAME = "Entries";
	
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        this.savedInstanceState = savedInstanceState;
        
        helper = new DatabaseHelper(this);
        dataCursor = helper.getAllDepts();
        textView = new TextView(this);
        layout = (LinearLayout)findViewById(R.id.LinearLayout0);
        
        layout.addView(textView);
        System.out.println(dataCursor.getColumnNames());
        textView.setText(new StringBuilder().append(dataCursor.getColumnNames()));
        
        
    }
    
    @Override
    public void onDestroy() {
    	
    }
}